﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2024-12-17 01:27
    /// 描 述：实体类
    /// </summary>
    [Table("module_category_user")]
    public class ModuleCategoryUserEntity : BaseEntity
    {
        /// <summary>
        /// 功能分类Id
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? module_category_Id { get; set; }
        /// <summary>
        /// 系统后台用户ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? userId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? create_time { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? modified_time { get; set; }
    }


    public class ModuleCategoryUser
    {
        /// <summary>
        /// 系统后台用户ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? Id { get; set; }

        public string UserName { get; set; }

        public string moduleNames { get; set; }

        public string moduleIds { get; set; }
    }

    public class ModuleCategoryUserTree
    {
        /// <summary>
        /// 所有表的主键
        /// long返回到前端js的时候，会丢失精度，所以转成字符串
        /// </summary>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? Id { get; set; }

        /// 角色对应的菜单，页面和按钮
        /// </summary>
        public string moduleIds { get; set; }

        [JsonConverter(typeof(StringJsonConverter))]
        public long? userId { get; set; }

    }
}
